3.1.23 \(\int (d+i c d x)^3 (a+b \text {ArcTan}(c x)) \, dx\) [23]

Optimal. Leaf size=100 \[ -i b d^3 x-\frac {b d^3 (1+i c x)^2}{4 c}-\frac {b d^3 (1+i c x)^3}{12 c}-\frac {i d^3 (1+i c x)^4 (a+b \text {ArcTan}(c x))}{4 c}-\frac {2 b d^3 \log (1-i c x)}{c} \]

[Out]

-I*b*d^3*x-1/4*b*d^3*(1+I*c*x)^2/c-1/12*b*d^3*(1+I*c*x)^3/c-1/4*I*d^3*(1+I*c*x)^4*(a+b*arctan(c*x))/c-2*b*d^3*
ln(1-I*c*x)/c

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4972, 641, 45} \begin {gather*} -\frac {i d^3 (1+i c x)^4 (a+b \text {ArcTan}(c x))}{4 c}-\frac {b d^3 (1+i c x)^3}{12 c}-\frac {b d^3 (1+i c x)^2}{4 c}-\frac {2 b d^3 \log (1-i c x)}{c}-i b d^3 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + I*c*d*x)^3*(a + b*ArcTan[c*x]),x]

[Out]

(-I)*b*d^3*x - (b*d^3*(1 + I*c*x)^2)/(4*c) - (b*d^3*(1 + I*c*x)^3)/(12*c) - ((I/4)*d^3*(1 + I*c*x)^4*(a + b*Ar
cTan[c*x]))/c - (2*b*d^3*Log[1 - I*c*x])/c

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 641

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c/e)*x)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 4972

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b*
ArcTan[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{
a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int (d+i c d x)^3 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c}+\frac {(i b) \int \frac {(d+i c d x)^4}{1+c^2 x^2} \, dx}{4 d}\\ &=-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c}+\frac {(i b) \int \frac {(d+i c d x)^3}{\frac {1}{d}-\frac {i c x}{d}} \, dx}{4 d}\\ &=-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c}+\frac {(i b) \int \left (-4 d^4+\frac {8 d^3}{\frac {1}{d}-\frac {i c x}{d}}-2 d^3 (d+i c d x)-d^2 (d+i c d x)^2\right ) \, dx}{4 d}\\ &=-i b d^3 x-\frac {b d^3 (1+i c x)^2}{4 c}-\frac {b d^3 (1+i c x)^3}{12 c}-\frac {i d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c}-\frac {2 b d^3 \log (1-i c x)}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 77, normalized size = 0.77 \begin {gather*} -\frac {i \left (3 (d+i c d x)^4 (a+b \text {ArcTan}(c x))-b d^4 \left (4 i-21 c x-6 i c^2 x^2+c^3 x^3+24 i \log (i+c x)\right )\right )}{12 c d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + I*c*d*x)^3*(a + b*ArcTan[c*x]),x]

[Out]

((-1/12*I)*(3*(d + I*c*d*x)^4*(a + b*ArcTan[c*x]) - b*d^4*(4*I - 21*c*x - (6*I)*c^2*x^2 + c^3*x^3 + (24*I)*Log
[I + c*x])))/(c*d)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 144, normalized size = 1.44

method result size
derivativedivides \(\frac {-\frac {i d^{3} \left (i c x +1\right )^{4} a}{4}-\frac {i d^{3} b \arctan \left (c x \right ) c^{4} x^{4}}{4}-d^{3} b \arctan \left (c x \right ) c^{3} x^{3}+\frac {3 i d^{3} b \arctan \left (c x \right ) c^{2} x^{2}}{2}+b \arctan \left (c x \right ) d^{3} c x +\frac {7 i d^{3} b \arctan \left (c x \right )}{4}-\frac {7 i d^{3} b c x}{4}+\frac {i d^{3} b \,c^{3} x^{3}}{12}+\frac {d^{3} b \,c^{2} x^{2}}{2}-b \ln \left (c^{2} x^{2}+1\right ) d^{3}}{c}\) \(144\)
default \(\frac {-\frac {i d^{3} \left (i c x +1\right )^{4} a}{4}-\frac {i d^{3} b \arctan \left (c x \right ) c^{4} x^{4}}{4}-d^{3} b \arctan \left (c x \right ) c^{3} x^{3}+\frac {3 i d^{3} b \arctan \left (c x \right ) c^{2} x^{2}}{2}+b \arctan \left (c x \right ) d^{3} c x +\frac {7 i d^{3} b \arctan \left (c x \right )}{4}-\frac {7 i d^{3} b c x}{4}+\frac {i d^{3} b \,c^{3} x^{3}}{12}+\frac {d^{3} b \,c^{2} x^{2}}{2}-b \ln \left (c^{2} x^{2}+1\right ) d^{3}}{c}\) \(144\)
risch \(-\frac {d^{3} \left (c x -i\right )^{4} b \ln \left (i c x +1\right )}{8 c}-\frac {i d^{3} a \,c^{3} x^{4}}{4}+\frac {d^{3} c^{3} b \,x^{4} \ln \left (-i c x +1\right )}{8}-\frac {i d^{3} c^{2} b \,x^{3} \ln \left (-i c x +1\right )}{2}+\frac {i d^{3} b \,c^{2} x^{3}}{12}-d^{3} a \,c^{2} x^{3}+\frac {3 i d^{3} a c \,x^{2}}{2}-\frac {3 d^{3} c b \,x^{2} \ln \left (-i c x +1\right )}{4}+\frac {i b \,d^{3} x \ln \left (-i c x +1\right )}{2}+\frac {b c \,d^{3} x^{2}}{2}-\frac {7 i d^{3} x b}{4}+x \,d^{3} a +\frac {15 i d^{3} \arctan \left (c x \right ) b}{8 c}-\frac {15 b \,d^{3} \ln \left (c^{2} x^{2}+1\right )}{16 c}\) \(208\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+I*c*d*x)^3*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c*(-1/4*I*d^3*(1+I*c*x)^4*a-1/4*I*d^3*b*arctan(c*x)*c^4*x^4-d^3*b*arctan(c*x)*c^3*x^3+3/2*I*d^3*b*arctan(c*x
)*c^2*x^2+b*arctan(c*x)*d^3*c*x+7/4*I*d^3*b*arctan(c*x)-7/4*I*d^3*b*c*x+1/12*I*d^3*b*c^3*x^3+1/2*d^3*b*c^2*x^2
-b*ln(c^2*x^2+1)*d^3)

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 197 vs. \(2 (82) = 164\).
time = 0.47, size = 197, normalized size = 1.97 \begin {gather*} -\frac {1}{4} i \, a c^{3} d^{3} x^{4} - a c^{2} d^{3} x^{3} - \frac {1}{12} i \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c^{3} d^{3} - \frac {1}{2} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b c^{2} d^{3} + \frac {3}{2} i \, a c d^{3} x^{2} + \frac {3}{2} i \, {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} b c d^{3} + a d^{3} x + \frac {{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d^{3}}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)^3*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

-1/4*I*a*c^3*d^3*x^4 - a*c^2*d^3*x^3 - 1/12*I*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5)
)*b*c^3*d^3 - 1/2*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*c^2*d^3 + 3/2*I*a*c*d^3*x^2 + 3/2
*I*(x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*c*d^3 + a*d^3*x + 1/2*(2*c*x*arctan(c*x) - log(c^2*x^2 +
1))*b*d^3/c

________________________________________________________________________________________

Fricas [A]
time = 1.46, size = 161, normalized size = 1.61 \begin {gather*} \frac {-6 i \, a c^{4} d^{3} x^{4} - 2 \, {\left (12 \, a - i \, b\right )} c^{3} d^{3} x^{3} - 12 \, {\left (-3 i \, a - b\right )} c^{2} d^{3} x^{2} + 6 \, {\left (4 \, a - 7 i \, b\right )} c d^{3} x - 45 \, b d^{3} \log \left (\frac {c x + i}{c}\right ) - 3 \, b d^{3} \log \left (\frac {c x - i}{c}\right ) + 3 \, {\left (b c^{4} d^{3} x^{4} - 4 i \, b c^{3} d^{3} x^{3} - 6 \, b c^{2} d^{3} x^{2} + 4 i \, b c d^{3} x\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{24 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)^3*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/24*(-6*I*a*c^4*d^3*x^4 - 2*(12*a - I*b)*c^3*d^3*x^3 - 12*(-3*I*a - b)*c^2*d^3*x^2 + 6*(4*a - 7*I*b)*c*d^3*x
- 45*b*d^3*log((c*x + I)/c) - 3*b*d^3*log((c*x - I)/c) + 3*(b*c^4*d^3*x^4 - 4*I*b*c^3*d^3*x^3 - 6*b*c^2*d^3*x^
2 + 4*I*b*c*d^3*x)*log(-(c*x + I)/(c*x - I)))/c

________________________________________________________________________________________

Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (85) = 170\).
time = 2.12, size = 267, normalized size = 2.67 \begin {gather*} - \frac {i a c^{3} d^{3} x^{4}}{4} - \frac {b d^{3} \left (\frac {\log {\left (22 b c d^{3} x - 22 i b d^{3} \right )}}{8} + \frac {49 \log {\left (22 b c d^{3} x + 22 i b d^{3} \right )}}{40}\right )}{c} - x^{3} \left (a c^{2} d^{3} - \frac {i b c^{2} d^{3}}{12}\right ) - x^{2} \left (- \frac {3 i a c d^{3}}{2} - \frac {b c d^{3}}{2}\right ) - x \left (- a d^{3} + \frac {7 i b d^{3}}{4}\right ) + \left (- \frac {b c^{3} d^{3} x^{4}}{8} + \frac {i b c^{2} d^{3} x^{3}}{2} + \frac {3 b c d^{3} x^{2}}{4} - \frac {i b d^{3} x}{2}\right ) \log {\left (i c x + 1 \right )} + \frac {\left (5 b c^{4} d^{3} x^{4} - 20 i b c^{3} d^{3} x^{3} - 30 b c^{2} d^{3} x^{2} + 20 i b c d^{3} x - 26 b d^{3}\right ) \log {\left (- i c x + 1 \right )}}{40 c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)**3*(a+b*atan(c*x)),x)

[Out]

-I*a*c**3*d**3*x**4/4 - b*d**3*(log(22*b*c*d**3*x - 22*I*b*d**3)/8 + 49*log(22*b*c*d**3*x + 22*I*b*d**3)/40)/c
 - x**3*(a*c**2*d**3 - I*b*c**2*d**3/12) - x**2*(-3*I*a*c*d**3/2 - b*c*d**3/2) - x*(-a*d**3 + 7*I*b*d**3/4) +
(-b*c**3*d**3*x**4/8 + I*b*c**2*d**3*x**3/2 + 3*b*c*d**3*x**2/4 - I*b*d**3*x/2)*log(I*c*x + 1) + (5*b*c**4*d**
3*x**4 - 20*I*b*c**3*d**3*x**3 - 30*b*c**2*d**3*x**2 + 20*I*b*c*d**3*x - 26*b*d**3)*log(-I*c*x + 1)/(40*c)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)^3*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [B]
time = 0.69, size = 147, normalized size = 1.47 \begin {gather*} -\frac {d^3\,\left (a\,x\,12{}\mathrm {i}+21\,b\,x+b\,x\,\mathrm {atan}\left (c\,x\right )\,12{}\mathrm {i}\right )\,1{}\mathrm {i}}{12}-\frac {c^3\,d^3\,\left (3\,a\,x^4+3\,b\,x^4\,\mathrm {atan}\left (c\,x\right )\right )\,1{}\mathrm {i}}{12}+\frac {d^3\,\left (21\,b\,\mathrm {atan}\left (c\,x\right )+b\,\ln \left (c^2\,x^2+1\right )\,12{}\mathrm {i}\right )\,1{}\mathrm {i}}{12\,c}+\frac {c\,d^3\,\left (18\,a\,x^2+18\,b\,x^2\,\mathrm {atan}\left (c\,x\right )-b\,x^2\,6{}\mathrm {i}\right )\,1{}\mathrm {i}}{12}+\frac {c^2\,d^3\,\left (a\,x^3\,12{}\mathrm {i}+b\,x^3+b\,x^3\,\mathrm {atan}\left (c\,x\right )\,12{}\mathrm {i}\right )\,1{}\mathrm {i}}{12} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atan(c*x))*(d + c*d*x*1i)^3,x)

[Out]

(d^3*(21*b*atan(c*x) + b*log(c^2*x^2 + 1)*12i)*1i)/(12*c) - (c^3*d^3*(3*a*x^4 + 3*b*x^4*atan(c*x))*1i)/12 - (d
^3*(a*x*12i + 21*b*x + b*x*atan(c*x)*12i)*1i)/12 + (c*d^3*(18*a*x^2 - b*x^2*6i + 18*b*x^2*atan(c*x))*1i)/12 +
(c^2*d^3*(a*x^3*12i + b*x^3 + b*x^3*atan(c*x)*12i)*1i)/12

________________________________________________________________________________________